CentOS 7
Sponsored Link

Gitolite3 : Set Access Control
2015/07/21
 
Set Access Control for Repositories. Work with Gitolite admin user.
[1] For example, Add read and write priviledge for "cent" user to public-repo.
-sh-4.2$
cd ~/gitolite-admin/conf

-sh-4.2$
vi gitolite.conf
# specify SSH key filename for user specification below

repo public-repo
    RW+     =   id_cent

-sh-4.2$
git commit -a -m "Change Permission for public-repo"

-sh-4.2$
git push

[2] For example, Add read and write priviledge for "developer" group to public-repo.
-sh-4.2$
cd ~/gitolite-admin/conf

-sh-4.2$
vi gitolite.conf
@developer = id_cent id_ubuntu

repo public-repo
    RW+     =   @developer

-sh-4.2$
git commit -a -m "Change Permission for public-repo"

-sh-4.2$
git push

[3] For example, Add access right like follows.
* add read/write for "redhat" user to all
* add read/write for "deployer" group to "prod" branch
* add read/write for "developer" group to "dlp" branch
-sh-4.2$
cd ~/gitolite-admin/conf

-sh-4.2$
vi gitolite.conf
@developer = id_cent id_ubuntu
@deployer = id_debian id_fedora

repo public-repo
    RW+     =   id_redhat
    RW prod =  @deployer
    RW dlp  =  @developer

-sh-4.2$
git commit -a -m "Change Permission for public-repo"

-sh-4.2$
git push

 
Tweet